<!doctype html>
<html lang="en" class="fixed">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>

    <title>TEST教师</title>

    <link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
    <link rel="icon" type="image/png" sizes="192x192" href="favicon/android-icon-192x192.png">
    <link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
    <link rel="stylesheet" type="text/css"
          href="<?php xcho(loadSource('/assets/plugins/bootstrap/css/bootstrap.min.css')) ?>">

    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/helsinki/vendor/select2/css/select2.min.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/helsinki/vendor/select2/css/select2-bootstrap.min.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/animate.css/animate.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/font-awesome/css/font-awesome.css')) ?>">
    <link rel="stylesheet"
          href="<?php xcho(loadSource('/assets/plugins/data-table/media/css/dataTables.bootstrap.min.css')) ?>">

    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/ztree/css/zTreeStyle/zTreeStyle.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/app/css/style.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/plugins/layui/css/layui.css')) ?>" media="all">
    <link rel="stylesheet" href="<?php xcho(loadSource('/app/css/app.css')) ?>">
    <link rel="stylesheet" href="<?php xcho(loadSource('/assets/css/new_main.css')) ?>">
    
    <style>
        .pagination{
            margin: 0;
        }
        ul,li,ol,li{
            list-style: none;
        }
        body{
            background: #f4f4f4;
        }
        .addCourse{
            width: 900px;
            margin: 0 auto;
            padding: 20px;
            background: #fff;
        }
        .addCourse .addCourse-title{
            /*padding: 10px 0px;*/
            text-align: left;
        }
        .col-xs-4{
            margin-top: 15px;
        }
        .addCourse .addCourse-content .addCourse-cont h3{
            font-size: 12px;
            padding: 8px 10px;
            background: rgba(243,243,243,.5);
            margin-top: 0;
        }
        .addCourse .addCourse-content .addCourse-cont .cont-form{
            padding: 0 20px 20px;
        }
        .addCourse .addCourse-content .addCourse-cont .cont-form .form-row{
            margin-top: 20px;
        }
        .addCourse .addCourse-content .addCourse-cont .cont-form .form-row.linkage select{
            width: 100px;
        }
        .addCourse .addCourse-content .addCourse-cont .cont-form .form-row p{
            float: left;
        }
        .addCourse .addCourse-content .addCourse-cont .cont-form .form-row textarea{
            resize: none;
            border-radius: 5px;
            border: 1px #ccc solid;
            text-indent: 10px;
        }
        .addCourse .addCourse-content .addCourse-cont .cont-form span{
            margin-left: 40px;
        }
        .addCourse .addCourse-content .addCourse-cont .cont-form span:nth-of-type(1){
            margin-left: 0;
        }
        .addCourse .addCourse-content .addCourse-cont .cont-form select{
            /*width: 170px;*/
            border-radius: 5px;
            height: 24px;
            border:1px #ccc solid;
            font-size: 12px;
        }
        .addCourse .addCourse-content .addCourse-cont .addCourse-btn{
            width: 100%;
            height: 40px;
            padding:0 20px;
        }
        .addCourse .addCourse-content .addCourse-cont .addCourse-btn .addCourse-btn-cont{
            float: right;
        }
        .addCourse .addCourse-content .addCourse-cont .addCourse-btn .addCourse-btn-cont button{
            padding: 2px 10px;
            border:none;
            background: #1ab394;
            color:#fff;
            border-radius: 5px;
            color:#fff;
            margin-right: 10px;
            font-size: 12px;
        }
        .addCourse .addCourse-content .addCourse-cont .addCourse-btn .addCourse-btn-cont button:hover{
            background: #1ab394;
        }
        .addCourse .addCourse-content .addCourse-cont .addCourse-btn .addCourse-btn-cont button:nth-of-type(1){
            background: #fff;
            color:#888;
            border: 1px #ccc solid;
        }
    </style>
</head>

<body><?php include_once TPL_PATH . 'public/nav.phtml'; ?>


<div class="addCourse">
    <div class="addCourse-title">
        <ol class="breadcrumb">
            <li class="active">老师信息</li>
        </ol></div>
    <div class="addCourse-content">
        <form action="" id="form">
            <div class="addCourse-cont">
            <h3>基本信息</h3>
            <div class="cont-form">
                <div class="form-row">
                    <div class="row">
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">老师名称：</span>
                                <input type="text" name="tname" value=""  class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">联系手机：</span>
                                <input type="number" name="cellphone" value="" class="form-control mobile">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">电子邮箱：</span>
                                <input type="email" name="email" value="" class="form-control email">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class="row">
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">QQ：</span>
                                <input type="text" name="qq" value=""  class="form-control int">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span>性别：</span>
                                <select name="sex" id="">
                                    <?php foreach ($sex as $key => $value): ?>
                                        <option value="<?php xcho($value['dict_value']) ?>"><?php xcho($value['cn_name']); ?></option>
                                    <?php endforeach ?>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">毕业院校：</span>
                                <input type="text" name="graduate_school" value="" class="form-control">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class="row">
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">专业：</span>
                                <input type="text" name="major" value=""  class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span>教育水平：</span>
                                <select name="degree" id="">
                                    <?php foreach ($degree as $key => $value): ?>
                                        <option value="<?php xcho($value['dict_value']) ?>"><?php xcho($value['cn_name']); ?></option>
                                    <?php endforeach ?>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">参加工作时间：</span>
                                <input type="date" name="start_work_date" value="" class="form-control">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="cont-form">
                <h3>授课信息</h3>
                <div class="form-row">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="input-group">
                                <span>科目：</span>
                                <select name="subject" id="select2-example-tags" class="form-control select-tag-primary" multiple="multiple" style="width:100%">

                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span>级别：</span>
                                <select name="level" id="">
                                    <?php foreach ($level as $key => $value): ?>
                                        <option value="<?php xcho($value['dict_value']) ?>" ><?php xcho($value['cn_name']); ?></option>
                                    <?php endforeach ?>
                                </select>
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">最大同时授课：</span>
                                <input type="text" name="max_simul" value="" class="form-control int">
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-row">
                    <div class="row">
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">入职时间：</span>
                                <input type="date" name="hire_time" value="" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span>状态：</span>
                                <select name="job_status" id="">
                                    <?php foreach ($level as $key => $value): ?>
                                        <option value="<?php xcho($value['dict_value']) ?>" ><?php xcho($value['cn_name']); ?></option>
                                    <?php endforeach ?>
                                </select>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="cont-form">
                <h3>同步信息</h3>
                <div class="form-row">
                    <div class="row">
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">天王星教师ID：</span>
                                <input type="text" name="twx_id" value="" class="form-control int">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">天王星教师账号：</span>
                                <input type="text" name="twx_account" value="" class="form-control">
                            </div>
                        </div>
                        <div class="col-xs-4">
                            <div class="input-group">
                                <span class="input-group-addon">天王星教师密码：</span>
                                <input type="text" name="twx_password" value="" class="form-control">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="cont-form">
                <span>备注<b style="visibility:hidden;"></b>：</span>
                <textarea name="remark" id="" cols="30" rows="10"></textarea>
            </div>
            <div class="addCourse-btn">
                <div class="addCourse-btn-cont">
                    <button >取消</button>
                    <button type="submit" class="forsure">确定</button>
                </div>

            </div>
        </div>
        </form>
    </div>
</div>

<script src="<?php xcho(loadSource('/assets/plugins/jquery/jquery.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/bootstrap/js/bootstrap.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/data-table/media/js/jquery.dataTables.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/data-table/media/js/dataTables.bootstrap.min.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/helsinki/vendor/bootstrap_max-lenght/bootstrap-maxlength.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/helsinki/vendor/select2/js/select2.min.js')) ?>"></script>
<script
        src="<?php xcho(loadSource('/assets/plugins/data-table/extensions/Responsive/js/dataTables.responsive.min.js')) ?>"></script>
<script
        src="<?php xcho(loadSource('/assets/plugins/data-table/extensions/Responsive/js/responsive.bootstrap.min.js')) ?>"></script>

<script src="<?php xcho(loadSource('/assets//plugins/ztree/js/jquery.ztree.core.js')) ?>"></script>
<script src="<?php xcho(loadSource('/assets/plugins/layui/layui.all.js')) ?>" charset="utf-8"></script>
<script type="text/javascript" src="<?php xcho(loadSource('/assets//plugins/ztree/js/jquery.ztree.excheck.js')) ?>"></script>
<script type="text/javascript" src="<?php xcho(loadSource('/assets//plugins/ztree/js/jquery.ztree.exedit.js')) ?>"></script>
<script type="text/javascript"
        src="<?php xcho(loadSource('/assets/js/validate.js')) ?>"></script>
<script>
    $(function () {
        $("#select2-example-tags").select2({
            placeholder: "选择科目",
            allowClear: true,
            tags: true,
            tokenSeparators: [',']
        });
        $('form').submit(function() {
            var isContine = validateF();
            if(!isContine) return false;
            $.ajax({
                url: $("input[name='save_teacher']").val(),
                type: 'post',
                data:$(this).serialize(),
                dataType: 'json',
                success: function (data) {
                    console.log(data)
                    if(data.success == 1){
                        layer.alert('删除成功!',function (){
                            location.reload();
                        });
                    }else{

                    }
                },
                complete:function(){

                },
                error: function () {

                }
            });
            return false;
        });
    });
</script>
    <?php include_once TPL_PATH . 'public/foot_script.phtml'; ?>

<button id="top" style="height: 50px;width: 50px;"></button></body>

</html>

